﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections.Specialized;

public partial class MyShop_Default : System.Web.UI.Page
{
    /// <summary>
    /// 
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    /// <example>http://www.dotnetperls.com/querystring</example>
    protected void Page_Load(object sender, EventArgs e)
    {
        string message = string.Empty;
        HttpRequest q = Request;
        NameValueCollection n = q.QueryString;
        if (n.HasKeys())
        {
            MessageBoxPanel.Visible = true;
            string s = n.GetKey(0);
            
            if (!String.IsNullOrEmpty(s))
            {
                bool success = bool.Parse(n.Get(0));
                if(success) MessageBoxPanel.CssClass = "messageBox success large";
                else MessageBoxPanel.CssClass = "messageBox error large";                
            }

            string m = n.GetKey(1);
            if(!String.IsNullOrEmpty(m)) message = n.Get(1);

            Label lbl = (Label)MessageBoxPanel.FindControl("lblMessage");
            lbl.Text = (string)GetLocalResourceObject(message);
        }
    }
}